package com.laowang.handler;

import com.laowang.exception.SellerAuthorizeException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by Administrator on 2019/1/26.
 */
@ControllerAdvice
public class SellExceptionHandler {

    //拦截异常登录
     @ExceptionHandler(value = SellerAuthorizeException.class)
     public ModelAndView handlerAuthorizeException(){

         return new ModelAndView("/seller/product/list");
     }
}
